<template>
    <div class="go-to-foods" @click="gotofoods" v-if="getStoreListData">
        堂食点餐
    </div>
</template>
<script>
import {mapGetters,mapMutations} from 'vuex';

export default {
    data(){
        return {
            isShow:false,
        }
    },
    computed:{
        ...mapGetters('qxz',[
            "getStoreList"
        ]),
        ...mapGetters('wxh', [
            'sessionId',
            'login',
            'userInfo'
        ]),
        getStoreListData(){
            let storeId = localStorage.getItem('storeId');
            let that = this;
            this.getStoreList.forEach(val => {
                if(val.storeId == storeId){
                    that.isShow = val.storeOpen;
                }
            });
            return this.isShow
        }
    },
    created(){ 
        
    },
    methods:{
        gotofoods(){
            // if(!this.login){
            //     this.$router.push({path: 'login',query: {page: 'foods'}});
            //     return;
            // }
            this.$router.push('newFoodsClassify');
        },
    }
}
</script>
<style scoped>
.go-to-foods {
    display: inline-block;
    height: 2rem;
    width: 3.5rem;
    position: fixed;
    bottom: 8rem;
    right: 0;
    overflow: hidden;
    white-space: nowrap;
    background: #38b035;
    z-index: 99;
    border-bottom-left-radius: 1rem;
    border-top-left-radius: 1rem;
    text-align: center;
    border: 1px solid #cfcfcf;
    color: white;
    line-height: 2rem;
    font-size: 0.6rem;
}
</style>

